import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

const router = new Router({
  routes: [
    {
      path: '/',
      redirect: '/pages/login/index'
    },
    {
      name: 'redirect',
      path: '/pages/redirect/index',
      component: () => import('@/views/redirect/index')
    },
    {
      name: 'index',
      path: '/pages/index/index',
      component: () => import('@/views/index/index')
    },
    {
      name: 'login',
      path: '/pages/login/index',
      component: () => import('@/views/login/index')
    },
    {
      name: 'exercise_index',
      path: '/pages/exercise/index',
      component: () => import('@/views/exercise/index'),
      meta: { keepAlive: true }
    },
    {
      name: 'exercise_practice_xkw_index',
      path: '/pages/exercise/practice/xkw/index',
      component: () => import('@/views/exercise/practice/xkw/index')
    },
    {
      name: 'exercise_practice_english_index',
      path: '/pages/exercise/practice/english/index',
      component: () => import('@/views/exercise/practice/english/index')
    },
    {
      name: 'exercise_record',
      path: '/pages/exercise/record/index',
      component: () => import('@/views/exercise/record/index')
    },
    {
      name: 'exercise_record_detail_xkw_index',
      path: '/pages/exercise/record/detail/xkw/index',
      component: () => import('@/views/exercise/record/detail/xkw/index')
    },
    {
      name: 'exercise_record_detail_english_index',
      path: '/pages/exercise/record/detail/english/index',
      component: () => import('@/views/exercise/record/detail/english/index')
    },
    {
      name: 'exercise_record_detail_english_choose',
      path: '/pages/exercise/record/detail/english/choose/index',
      component: () => import('@/views/exercise/record/detail/english/choose/index')
    },
    {
      name: 'exercise_record_detail_english_dialogue',
      path: '/pages/exercise/record/detail/english/dialogue/index',
      component: () => import('@/views/exercise/record/detail/english/dialogue/index')
    },
    {
      name: 'exercise_record_detail_english_read',
      path: '/pages/exercise/record/detail/english/read/index',
      component: () => import('@/views/exercise/record/detail/english/read/index')
    },
    {
      name: 'exercise_record_detail_english_fill',
      path: '/pages/exercise/record/detail/english/fill/index',
      component: () => import('@/views/exercise/record/detail/english/fill/index')
    },
    {
      name: 'exercise_record_detail_english_picture',
      path: '/pages/exercise/record/detail/english/picture/index',
      component: () => import('@/views/exercise/record/detail/english/picture/index')
    }
  ],
  mode: 'hash'
})

export default router
